package com.student.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ActivityList entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Activity_List", schema = "dbo", catalog = "StudentManager")
public class ActivityList implements java.io.Serializable {

	// Fields

	private Long activityId;
	private String activityName;
	private Set<ActivityAssociation> activityAssociations = new HashSet<ActivityAssociation>(
			0);

	// Constructors

	/** default constructor */
	public ActivityList() {
	}

	/** minimal constructor */
	public ActivityList(Long activityId, String activityName) {
		this.activityId = activityId;
		this.activityName = activityName;
	}

	/** full constructor */
	public ActivityList(Long activityId, String activityName,
			Set<ActivityAssociation> activityAssociations) {
		this.activityId = activityId;
		this.activityName = activityName;
		this.activityAssociations = activityAssociations;
	}

	// Property accessors
	@Id
	@Column(name = "Activity_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getActivityId() {
		return this.activityId;
	}

	public void setActivityId(Long activityId) {
		this.activityId = activityId;
	}

	@Column(name = "Activity_Name", nullable = false, length = 128)
	public String getActivityName() {
		return this.activityName;
	}

	public void setActivityName(String activityName) {
		this.activityName = activityName;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "activityList")
	public Set<ActivityAssociation> getActivityAssociations() {
		return this.activityAssociations;
	}

	public void setActivityAssociations(
			Set<ActivityAssociation> activityAssociations) {
		this.activityAssociations = activityAssociations;
	}

}